<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/visao/templates/templateConfiguracao.xhtml">
	<ui:param name="pManagedBean" value="#{parametrizacaoBean}" />
	<ui:param name="pTituloForm" value="#{i18n['param.form.titulo']}" />

	<ui:define name="title">
		<h:outputText value="#{i18n['param.pagina.nome']}" />
	</ui:define>

	<ui:define name="content">
		<script type="text/javascript"
			src="#{facesContext.externalContext.requestContextPath}/resources/js/jquery.maskMoney.js">
		</script>

		<script type="text/javascript">
			jQuery(function() {
				jQuery('input[id*=vlrFipe]').maskMoney({
					symbol : 'R$ ',
					showSymbol : true,
					thousands : '.',
					decimal : ',',
					symbolStay : true
				});

			});
		</script>
		
		<script type="text/javascript">
			jQuery(function() {
				jQuery('input[id*=idMaxOperador]').maskMoney({
					symbol : 'R$ ',
					showSymbol : true,
					thousands : '.',
					decimal : ',',
					symbolStay : true
				});

			});
		</script>
		
		<script type="text/javascript">
			jQuery(function() {
				jQuery('input[id*=idMaxLider]').maskMoney({
					symbol : 'R$ ',
					showSymbol : true,
					thousands : '.',
					decimal : ',',
					symbolStay : true
				});

			});
		</script>
		
		<p:panel>
			<p:panel id="panelConfigSiTef" header="#{i18n['param.configSiTefI']}"  toggleable="true" toggleSpeed="500">
				<h:panelGrid columns="2" cellpadding="3" cellspacing="3">
					<h:outputText value="#{i18n['param.ipsitef']}" style="font-weight:bold;"/>
					<p:inplace id="txtIp" editor="true">
						<p:inputText value="#{parametrizacaoBean.parametrizacao.ipSitef}" label="text" />
					</p:inplace>
					
					<h:outputText value="#{i18n['param.codEmpresa']}" style="font-weight:bold;"/>
					<p:inplace id="txtEmpresa" editor="true">
						<p:inputText value="#{parametrizacaoBean.parametrizacao.codigoEmpresa}" label="text" maxlength="8" />
					</p:inplace>
					
					<h:outputText value="#{i18n['param.numTerminal']}" style="font-weight:bold;"/>
					<p:inplace id="txtTerminal" editor="true">
						<p:inputText value="#{parametrizacaoBean.parametrizacao.numTerminal}" label="text" maxlength="8" />
					</p:inplace>					
				</h:panelGrid>
			</p:panel>

			<p:spacer height="15" />

			<p:panel id="panelGsan" header="#{i18n['param.legend.gsan']}"  toggleable="true" toggleSpeed="500">
				<h:panelGrid columns="2" cellpadding="3" cellspacing="3">
					<h:outputText value="#{i18n['param.boletoonline']}:" style="font-weight: bold;" />
					<p:selectBooleanCheckbox value="#{parametrizacaoBean.parametrizacao.validacaoBoletoOnline}" required="true" />
			
					<h:outputText value="#{i18n['param.pagamentoonline']}:" style="font-weight: bold;" />
					<p:selectBooleanCheckbox value="#{parametrizacaoBean.parametrizacao.validacaoPagamentoOnline}" required="true"/>
				</h:panelGrid>
			</p:panel>

			<p:spacer height="15" />

			<p:panel id="panelEstorno" header="#{i18n['param.legend.estorno']}" rendered="false"  toggleable="true" toggleSpeed="500" >
				<!--  TODO em caso de ter implementacao de estorno  -->
				<h:panelGrid columns="2" cellpadding="3" cellspacing="3" >
					<h:outputText value="#{i18n['param.perfil']}:" 
						style="font-weight: bold;" />
					<p:inputText value="#{parametrizacaoBean.parametrizacao.descricao}" 
						required="true" style="width:250px"/>
						
					<h:outputText value="#{i18n['param.form.qtdEstorno']}:"
						style="font-weight: bold;"/>
					<p:spinner value="#{parametrizacaoBean.parametrizacao.qtdMaxEstorno}"
						min="0" required="true"/>
						
					<h:outputText value="#{i18n['param.form.valorEstorno']}:"
						style="font-weight: bold;"/>
					<p:inputText id="vlrFipe" value="#{parametrizacaoBean.parametrizacao.valorMaxEstorno}"
						 converter="doubleConversor" style="width:250px" />
						
					<h:outputText value="#{i18n['param.valorMaxOperador']}:" 
						style="font-weight: bold;" />
					<p:inputText id="idMaxOperador" value="#{parametrizacaoBean.parametrizacao.valorMaxEstornoOperador}"
						 converter="doubleConversor" style="width:250px"/>
						
					<h:outputText value="#{i18n['param.valorMaxLider']}:" 
						style="font-weight: bold;" />
					<p:inputText id="idMaxLider" value="#{parametrizacaoBean.parametrizacao.valorMaxEstornoLider}"
						 converter="doubleConversor" style="width:250px"/>
				
				</h:panelGrid>
			</p:panel>

			<p:spacer height="12" />
			
		</p:panel>
	</ui:define>
</ui:composition>
</html>